from django.db import models

# Create your models here.
from goodsapp.models import *
from userapp.models import *


class Cart(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE, verbose_name='用户id')
    goods = models.ForeignKey(Goods, on_delete=models.CASCADE, verbose_name='商品id')
    num = models.IntegerField(verbose_name='商品数量')

    class Meta:
        db_table = 'cart'
